//
//  BKOrderPaymentHeaderFooterView.m
//  bestkeep
//
//  Created by 马乾征 on 16/11/11.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKOrderPaymentHeaderFooterView.h"

/**
    基类
 */

@implementation BKOrderPaymentHeaderFooterView

- (void)fillData:(id)data{}
+ (CGFloat)computeHeight:(id)data{
    return 0;
}

@end

/**
    section header
 */
@implementation BKOrderPaymentSectionHeaderView
{
    UILabel *_sectionTitle;
}

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self initialize];
    }
    return self;
}

- (void)initialize
{
    _sectionTitle = [[UILabel alloc] init];
    _sectionTitle.backgroundColor = [UIColor clearColor];
    _sectionTitle.textColor = [UIColor blackColor];
    _sectionTitle.font = UIFontCustom(15);
    [self.contentView addSubview:_sectionTitle];
    
    [self makeConstraints];
}

- (void)makeConstraints
{
    [_sectionTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(ApplicationBackGauge);
        make.centerY.mas_equalTo(self);
    }];
}

- (void)fillData:(id)data{
    if (data) {
        _sectionTitle.text = data[@"title"];
    }
}

+ (CGFloat)computeHeight:(id)data{
    return 30;
}

@end
